<template>
  <div class="page">
    <icon type="success" class="weui-flex__item" size="64" />
    <h2 class="line">操作成功</h2>
    <button class="line" type="primary" @click="handleGoIndex">返回首页</button>
    <button class="line" @click="handleGoHome">详情</button>
  </div>
</template>

<script>
export default {
  data () {
    return {

    }
  },
  methods: {
    handleGoIndex () {
      const url = `../index/main`
      wx.reLaunch({ url })
    },
    handleGoHome () {
      const url = `../preview/main?orderId=${this.$root.$mp.query.orderId}`
      wx.redirectTo({ url })
    }
  }
}
</script>

<style>
.page {
  text-align: center;
  padding: 16px;
}
.line {
  margin-top: 16px;
}
</style>
